<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<object>
  <a>
    <option id="objectAOption"></option>
  </a>
</object>

<canvas>
  <div>
    <option id="canvasDivOption"></option>
  </div>
</canvas>

<script>
var objectAOptionTest = async_test("Don't crash when animating opacity with inherit on an <option> in an <a> in an <object>.");
objectAOptionTest.step(function() {
  objectAOption.animate([{"opacity":"inherit"},{"opacity":"inherit"}], 1000);
});

var canvasDivOptionTest = async_test("Don't crash when animating opacity with inherit on an <option> in a <div> in a <canvas>.");
canvasDivOptionTest.step(function() {
  canvasDivOption.animate([{"opacity":"inherit"},{"opacity":"inherit"}], 1000);
});

requestAnimationFrame(_ => {
  requestAnimationFrame(_ => {
    objectAOptionTest.done();
    canvasDivOptionTest.done();
  });
});
</script>
